package com.financing.platform.dao.impl;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.financing.platform.dao.IfpFetchProductRegexDao;
import com.financing.platform.util.SqlName.ProductRegexSql;

@Repository("fetchProductRegexDaoImpl")
public class FetchProductRegexDaoImpl extends BaseDaoImpl implements IfpFetchProductRegexDao {

	@Override
	public Map<String, String> queryFetchXpath(Map<String, String> map) throws SQLException {
		return this.sqlMapClient.queryForMap(ProductRegexSql.queryFetchXpath,map, "xpathName", "xpathRegex");
	}

	@Override
	public List<Map<String, String>> queryAllFetchXpath(Map<String, String> map)
			throws SQLException {
		return this.sqlMapClient.queryForList(ProductRegexSql.queryAllFetchXpath,map);
	}

	@Override
	public int updateFetchXpath(Map<String, String> map) throws SQLException {
		 this.sqlMapClient.update(ProductRegexSql.updateFetchXpath,map);
		 return 0;
	}
	
}
